#!/usr/bin/env bash

# ----------------------------------------------------------------------
# Filename:   10-packages-dev.sh
# Version:    1.0
# Date:       2020/07/08
# Author:     Lz
# Email:      lz843723683@gmail.com
# History：     
#             Version 1.0, 2020/07/08
# Function:   开发版-默认服务和软件包
# Out:        
#              0 => TPASS
#              1 => TFAIL
#              other=> TCONF
# ----------------------------------------------------------------------

## TODO : 测试收尾清除工作
#
PkgClean_FTLYY_DEV(){
	return $TPASS
}


## TODO: 调用程序退出函数
#    In: $1 => 调用脚本结果值
PkgExit_FTLYY_DEV(){
        # 调用退出函数，其中调用了clean相关函数
	Exit_FTLIB ${1}
}


## TODO: 用户界面
#
PkgUSAGE_FTLYY_DEV(){
	USAGE_FTLIB "联研院开发版 - 默认安装软件包"
}


## TODO : 测试前的初始化 
#  Out  : 
#         0 => TPASS
#         1 => TFAIL
#         other=> TCONF
PkgInit_FTLYY_DEV(){
        # 调用初始化函数
	Init_FTLIB "PkgClean_FTLYY_DEV"
        # 调用用户界面函数
 	PkgUSAGE_FTLYY_DEV
}



## TODO ：默认安装软件包
#
PkgTest01_FTLYY_DEV(){
	local pkgArr="cyrus-sasl-lib-2.1.26-23.ky3.kb3.i686 gcc-c++-4.8.5-36.ky3.kb2.x86_64 glibc-devel-2.17-260.ky3.kb2.i686 libaio-0.3.109-13.ky3.kb3.i686 libaio-0.3.109-13.ky3.kb4.i686 libconfig-1.4.9-5.ky3.kb5.i686 libconfig-devel-1.4.9-5.ky3.kb5.i686 libdb-5.3.21-24.ky3.kb3.i686 libevent-2.0.21-4.ky3.kb5.i686 libevent-devel-2.0.21-4.ky3.kb5.i686 libevent-devel-2.0.21-4.ky3.kb5.x86_64 libstdc++-devel-4.8.5-36.ky3.kb2.x86_64 libtalloc-2.1.13-1.ky3.kb2.i686 libtalloc-devel-2.1.13-1.ky3.kb2.i686 libtalloc-devel-2.1.13-1.ky3.kb2.x86_64 libtevent-0.9.36-1.ky3.kb2.i686 libtevent-devel-0.9.36-1.ky3.kb2.i686 libtevent-devel-0.9.36-1.ky3.kb2.x86_64 libtool-ltdl-2.4.2-22.ky3.kb5.i686 ncurses-libs-5.9-14.20130511.ky3.kb3.i686 nspr-4.19.0-1.ky3.kb2.i686 nss-3.36.0-7.ky3.kb2.i686 nss-softokn-3.36.0-5.ky3.kb2.i686 nss-util-3.36.0-1.ky3.kb2.i686 openldap-2.4.44-20.ky3.kb2.i686 oracle-instantclient11.2-basic-11.2.0.4.0-1.i386 oracle-instantclient11.2-devel-11.2.0.4.0-1.i386 oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.i386 postgresql-9.2.24-1.ky3.kb3.i686 postgresql-devel-9.2.24-1.ky3.kb3.i686 postgresql-libs-9.2.24-1.ky3.kb3.i686 postgresql-libs-9.2.24-1.ky3.kb3.x86_64 readline-6.2-10.ky3.kb4.i686 sqlite-3.7.17-8.ky3.kb6.i686 unixODBC-2.3.1-11.ky3.kb3.i686 unixODBC-devel-2.3.1-11.ky3.kb3.i686 unixODBC-devel-2.3.1-11.ky3.kb3.x86_64"

	 PkgExistArr_FTLIB "isExist" "no" "no" "$pkgArr"
	RetParse_FTLIB "要求默认安装：${pkgArr}" "False"
}


## TODO : Main
#  Out  : 
#         0 => TPASS
#         1 => TFAIL
#         other => TCONF
PkgMain_FTLYY_DEV(){
	PkgInit_FTLYY_DEV

	PkgTest01_FTLYY_DEV

	return ${TPASS}	
}

PkgMain_FTLYY_DEV
PkgExit_FTLYY_DEV $?
